using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using NHCourse.Domain;

namespace NHCourse.Models
{
   public class UsersShowModel
   {
      public UsersShowModel()
      {
      }

      public UsersShowModel(User user)
      {
         Id = user.Id;
         OriginalDisplayName = DisplayName = user.DisplayName;
         WebsiteUrl = user.WebsiteUrl;
         Reputation = user.Reputation;
      }

      public int Id { get; set; }
      public string OriginalDisplayName { get; set; }

      [Required]
      [DisplayName("Display Name")]
      public string DisplayName { get; set; }

      [Required]
      [DisplayName("Website Url")]
      public string WebsiteUrl { get; set; }

      public int Reputation { get; set; }
   }
}